package com.hkk.entity;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

public class Car implements ApplicationContextAware,BeanFactoryAware,BeanNameAware{
    private String bran;
    private String price;

    public String getBran() {
        return bran;
    }

    public void setBran(String bran) {
        this.bran = bran;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "Car{" +
                "bran='" + bran + '\'' +
                ", price='" + price + '\'' +
                '}';
    }
    public  void init(){
        System.out.println("init被执行了=====");
    }
    public  void destory(){
        System.out.println("init被执行了=====");
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        System.out.println("setApplicationContext==="+applicationContext);
    }

    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
        System.out.println("setBeanFactory==="+beanFactory);
    }

    @Override
    public void setBeanName(String s) {
        System.out.println("setBeanName=="+s);
    }
}
